/* $RCSFile: ADNDynAccountleads.cs $
 * Apache license v2 2011 by Christian Surieux
 * $Source: ?/CRMWrapper3/DynEntities/ADNDynAccountleads.cs $
 * $log$
 * Revision 6 2010/08/06 19:56:32  christian.surieux
 *   Added Log to All cs files
 */

/* CopyRights Christian Surieux 2010 */
/* Class ADNDynAccountleads */
/* Date 2010-01-06 01:12:07Z */

using System;
using System.Diagnostics;
using System.Collections;
using System.ComponentModel;
using System.Collections.Generic;
using System.Text;
using CrmSdk;


namespace AddonNice.CRMWrapper
{
    public class ADNDynAccountleads : DynEntity
    {
        protected class Ftor: DFactor
        {
            public Ftor() : base(CrmStr.accountleads)
            {}

            public override Type DynType
            { get { return typeof(ADNDynAccountleads); } }

            public override string DynTypename
            { get { return CrmStr.accountleads; } }

            public override DynEntity Build()
            {   return new ADNDynAccountleads();}

            public override DynEntity Build(CRMWrapperBase w, InternalDynamicEntity dEntity, PropertyDescriptorCollection wproperties)
            {   return new ADNDynAccountleads(w, dEntity, wproperties, null);}

            public override DynEntity Build(CRMWrapperBase w, string PrimaryFieldValue)
            {   return new ADNDynAccountleads(w,PrimaryFieldValue);}

            public override DynEntity Build(CRMWrapperBase w,Guid PrimaryKeyValue)
            {   return new ADNDynAccountleads(w,PrimaryKeyValue);}
        }

        static ADNDynAccountleads(){new Ftor();} 

        public override bool HasPrimaryField
        {
           get
           {
               return false;
           }
        }

        public override bool HasOwnerProperty
        {
            get { return false; }
        }
        
        public ADNDynAccountleads() : base() { }
        
        public ADNDynAccountleads(CRMWrapperBase w,string PrimaryFieldValue)
            : base(w,CrmStr.accountleads){}
        
        public ADNDynAccountleads(CRMWrapperBase w,Guid CrmId) : base(w,CrmStr.accountleads,CrmId) { }
        
        public ADNDynAccountleads(CRMWrapperBase w,InternalDynamicEntity e) : base(w,CrmStr.accountleads,e,null,null) { }
        
        public ADNDynAccountleads(CRMWrapperBase w,InternalDynamicEntity e,PropertyDescriptorCollection prop,InternalColumnSet s) : base(w,CrmStr.accountleads,e,prop,s) { }
        
        public ADNDynAccountleads(ResetWrapperHandler fn,string PrimaryFieldValue)
            : base(fn,CrmStr.accountleads){}
        
        public ADNDynAccountleads(ResetWrapperHandler fn,Guid CrmId) : base(fn,CrmStr.accountleads,CrmId) { }
        
        public ADNDynAccountleads(ResetWrapperHandler fn,InternalDynamicEntity e) : base(fn,CrmStr.accountleads,e,null,null) { }
        
        public ADNDynAccountleads(ResetWrapperHandler fn,InternalDynamicEntity e,PropertyDescriptorCollection prop,InternalColumnSet s) : base(fn,CrmStr.accountleads,e,prop,s) { }

        /* Properties */

        [CrmDynAttribute(CrmStr.accountleads)]
        public Guid accountleadid
        {
            get
            { return KeyPropertyValue(CrmStr.accountleadid); }
            set
            { AddKeyProperty(CrmStr.accountleadid,value); }
        }

        protected override void SetCrmIdProperty(Guid crmId)
        {
            if ( !dicProperty.ContainsKey(CrmStr.accountleadid) || KeyPropertyValue(CrmStr.accountleadid) != crmId )
                accountleadid = crmId;
        }
        
        public override Guid PrimaryKeyGuidValue
        {
            get
            { return accountleadid; }
            set { accountleadid = value; }
        }
        
        [CrmDynAttribute(CrmStr.accountleads)]
        public Guid accountid
        {
            get
            { return UniqueIdentifierPropertyValue(CrmStr.accountid); }
            set
            { AddUniqueIdentifierProperty(CrmStr.accountid,value); }
        }

        [CrmDynAttribute(CrmStr.accountleads)]
        public Guid leadid
        {
            get
            { return UniqueIdentifierPropertyValue(CrmStr.leadid); }
            set
            { AddUniqueIdentifierProperty(CrmStr.leadid,value); }
        }
    }
}